package com.zhuifeng.product.controller;


import com.zhuifeng.product.domain.Goods;
import com.zhuifeng.product.service.GoodsService;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;
import java.util.List;

@RestController
@RequestMapping("/goods")
public class GoodsController {
    private final GoodsService goodsService;

    public GoodsController(GoodsService goodsService) {
        this.goodsService = goodsService;
    }

    @PostMapping("/goodsExcel")
    public void goodsExcel() throws IOException {
        goodsService.goodsInsert();
    }

    @PostMapping("/goodsInsert")
    public void goodsInsert() {
        goodsService.goodsExcel();
    }

}
